package com.zp.self.module.level_4_算法练习.数据结构.链表;

/**
 * @author By ZengPeng
 * @Description
 * @date in  2020/10/13 11:13
 * @Modified By
 */
public class ListNode {
    public int val;
    public ListNode next;

    public ListNode() {
    }

    public  ListNode(int val) {
        this.val = val;
    }

    public ListNode(int val, ListNode next) {
        this.val = val;
        this.next = next;
    }

    public  static  ListNode getNode(){
        ListNode n1 = new ListNode(4);
        ListNode n2 = new ListNode(2);
        ListNode n3 = new ListNode(1);
        ListNode n4 = new ListNode(3);
        ListNode n5 = new ListNode(5);
        n1.next=n2;
        n2.next=n3;
        n3.next=n4;
        n4.next=n5;
        return  n1;
    }
}
